/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package form;

import java.util.List;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author aasharm2
 */
public class InputForms extends org.apache.struts.action.ActionForm {

    private String tf;
    private String submit;
    private String tfIDF;
    private String authHub;
    private String pageRank;
    private String clusterStr;
    private String numResults;
    private String tfnumResults;
    private String tfidfnumResults;
    private String ahnumResults;
    private String prnumResults;
    private String clusnumResults;
    private String clusterresults;
    private String clusteringtype;
    private String login;
    private String searchTerm;
    private String seartchType;
    private int totalresults;
    private int clustersize;
    private double searchtime;
    private double w;
    private String docIndex;
    private String snippetStr;

    public String getSnippetStr() {
        return snippetStr;
    }

    public void setSnippetStr(String snippet) {
        this.snippetStr = snippet;
    }
    private List<List<String>> snippetList;

    public List<List<String>> getSnippetList() {
        return snippetList;
    }

    public void setSnippetList(List<List<String>> snippetList) {
        this.snippetList = snippetList;
    }

    

    public String getDocIndex() {
        return docIndex;
    }

    public void setDocIndex(String docIndex) {
        this.docIndex = docIndex;
    }

    public String getTfnumResults() {
        return tfnumResults;
    }

    public void setTfnumResults(String tfnumResults) {
        this.tfnumResults = tfnumResults;
    }

    public String getTfidfnumResults() {
        return tfidfnumResults;
    }

    public void setTfidfnumResults(String tfidfnumResults) {
        this.tfidfnumResults = tfidfnumResults;
    }

    public String getAhnumResults() {
        return ahnumResults;
    }

    public void setAhnumResults(String ahnumResults) {
        this.ahnumResults = ahnumResults;
    }

    public String getPrnumResults() {
        return prnumResults;
    }

    public void setPrnumResults(String prnumResults) {
        this.prnumResults = prnumResults;
    }

    public String getClusnumResults() {
        return clusnumResults;
    }

    public void setClusnumResults(String clusnumResults) {
        this.clusnumResults = clusnumResults;
    }

    public String getSeartchType() {
        return seartchType;
    }

    public void setSeartchType(String seartchType) {
        this.seartchType = seartchType;
    }

    public String getSearchTerm() {
        return searchTerm;
    }

    public void setSearchTerm(String searchTerm) {
        this.searchTerm = searchTerm;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getClusteringtype() {
        return clusteringtype;
    }

    public void setClusteringtype(String clusteringtype) {
        this.clusteringtype = clusteringtype;
    }

    public String getClusterresults() {
        return clusterresults;
    }

    public void setClusterresults(String clusterresults) {
        this.clusterresults = clusterresults;
    }

    public int getClustersize() {
        return clustersize;
    }

    public void setClustersize(int clustersize) {
        this.clustersize = clustersize;
    }

    public double getW() {
        return w;
    }

    public void setW(double w) {
        this.w = w;
    }

    public int getTotalresults() {
        return totalresults;
    }

    public void setTotalresults(int totalresults) {
        this.totalresults = totalresults;
    }

    public double getSearchtime() {
        return searchtime;
    }

    public void setSearchtime(double searchtime) {
        this.searchtime = searchtime;
    }

    public String getNumResults() {
        return numResults;
    }

    public void setNumResults(String numResults) {
        this.numResults = numResults;
    }

    public String getAuthhubnum() {
        return authhubnum;
    }

    public void setAuthhubnum(String authhubnum) {
        this.authhubnum = authhubnum;
    }
    private String authhubnum;

    public String getTf() {
        return tf;
    }

    public void setTf(String tf) {
        this.tf = tf;
    }

    public String getTfIDF() {
        return tfIDF;
    }

    public void setTfIDF(String tfIDF) {
        this.tfIDF = tfIDF;
    }

    public String getAuthHub() {
        return authHub;
    }

    public void setAuthHub(String authHub) {
        this.authHub = authHub;
    }

    public String getPageRank() {
        return pageRank;
    }

    public void setPageRank(String pageRank) {
        this.pageRank = pageRank;
    }

    public String getSubmit() {
        return submit;
    }

    public void setSubmit(String submit) {
        this.submit = submit;
    }

    public String getClusterStr() {
        return clusterStr;
    }

    public void setClusterStr(String clusterStr) {
        this.clusterStr = clusterStr;
    }

    /**
     * @return
     */
    /**
     *
     */
    public InputForms() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     *
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        if (getTf() == null || getTf().length() < 1) {
            errors.add("name", new ActionMessage("error.name.required"));
            // TODO: add 'error.name.required' key to your resources
        }
        return errors;
    }
}
